var car_brand_substr_id = 0; //品牌id
var car_series_id = 0; //车系id
var car_model_id = 0; //车型id
//下拉框获取的下标
var indexS = 1;

$(function() {
	get_user_mess_and_token();
	//自己代码
	var url = location.search;
	url_index = url.indexOf('/');
	car_brand_substr_id = url.substring(url.indexOf('?') + 1, (url_index != -1 ? url_index : url
		.length));
	car_series_id = url.split("/")[1];
	car_model_id = url.split("/")[2];
	indexS = url.split("/")[3];
	//当前位置
	getThisLocation();
	//亮点配置的图片显示
	getConfiguration();
	//亮点配置的图片数量
	getConfigImgCount();
	//悬浮标题显示和隐藏下拉框
	getXuanFu();
	//根据车名和车型名称，查看详细配置
	getByIdAndNameConfiguration();
	//查询标题信息
	getHead();
	//查询下拉框内容
	getXiaLaKuang();
	//热门咨询
	getInformation();
	//相关车系
	getByCar_series();
	//车型大图
	getCar_model_BigImages();
	//车型内饰图
	getCar_model_neishi();
	//车型空间图
	getCar_model_kojian();
	//车型外观图
	getCar_model_WaiGuan();
	//更多车型图
	getCar_model_More();
	//登录
	$(".to_login").attr("href",
		"http://127.0.0.1:8899/html/car_login.html?car_model_index/" +
		car_brand_substr_id + "/" + car_series_id + "/" + car_model_id);
});

/**
 * 标题信息
 */
function getHead() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/select_car_model_ById/" + car_model_id, function(
		data) {
		str =
			"<div class='tw-relative tw-h-32 xl:tw-h-36 tw-inline-flex tw-items-center tw-text-20 tw-font-semibold tw-overflow-hidden tw-mr-92'style='max-width:350px'>" +
			"<h1 class='tw-truncate'>" + data.car_model_name + "</h1>" +
			"<button type='button' class='tw-flex-none tw-ml-8 tw-w-22 tw-h-22 tw-leading-20 tw-rounded-full tw-bg-color-gray-400 tw-border-1 tw-border-color-gray-500'><i class='DCD_Icon icon_arrow_down_2 tw-font-normal'></i></button>" +
			"</div>";
		$(".xuanfus div").remove();
		$(".xuanfus").append(str);
	}, "JSON");
}

/**
 * 当前位置
 */
function getThisLocation() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/selectBy_brand_series_model_Id/" +
		car_brand_substr_id + "/" + car_series_id + "/" + car_model_id,
		function(data) {
			str = "<p class='breadcrumb_inner__3ahw2 breadcrumb_hide-line__3gPEY'>" +
				"<span class='breadcrumb_pos__-mebC'>当前位置：</span>" +
				"<span class='pos-item icon'><a target='_blank' href='http://127.0.0.1:8899/html/car_vehicle_selection.html'>选车</a></span>" +
				"<span class='pos-item icon icon-arrow-ic-r'><a target='_blank' href='http://127.0.0.1:8899/html/car_vehicle_selection.html?" +
				data.brand.brand_id + ","+data.brand.brand_name+"-x-x-x-x-x-x'>" +
				data.brand.brand_name + "</a></span>" +
				"<span class='pos-item icon icon-arrow-ic-r'><a target='_blank' href='http://127.0.0.1:8899/html/car_series_index.html?" +
				data.car_series_id + "'>" + data.car_series_name +
				"</a></span>" +
				"<span class='pos-item icon-arrow-ic-r'>" + data.car_model.car_model_name + "</span></p>";
			$("#ThisLocation p").remove();
			$("#ThisLocation").append(str);
		});
}

/**
 * 查询下拉框内容
 */
function getXiaLaKuang() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/modelList/" + car_series_id, function(data) {
		var str = "";
		$(data).each(function(index, item) {
			if (indexS == null || indexS == '') {
				indexS = index;
			}
			str += "<p><a onclick=\"getXiaLaKuangClick(" + item.car_model_id +
				"," + index + ")\">&nbsp;&nbsp;&nbsp;" + item.car_model_name +
				" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style='color: red;'>" + item
				.car_model_manufacturer_price + "万</span></a></p></br>";

		})
		$(".xialaXuan p").remove();
		$(".xialaXuan").append(str);
	}, "JSON");
}

/**
 * 下拉框点击事件
 */
function getXiaLaKuangClick(car_models_id, indexss) {
	indexS = indexss + 1; //大图类型页面下标为0 为全部，所以加1
	location.href = "http://127.0.0.1:8899/html/car_model_index.html?" + car_brand_substr_id + "/" + car_series_id +
		"/" + car_models_id + "/" + indexS;
}

/**
 * 悬浮标题显示和隐藏下拉框
 */
function getXuanFu() {
	$("#XuanFu").mouseover(function() {
		$(".xialaXuan").show();
	}).mouseout(function() {
		$(".xialaXuan").hide();
	});
}

/**
 * 亮点配置的图片显示
 */
function getConfiguration() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/highlights_configList/" + car_model_id, function(
		data) {
		var str = "";
		$(data).each(function(index, item) {
			str += "<li class='tw-flex-none tw-w-100/8 md:tw-w-100/3' style='padding:1px'>" +
				"<dl class='tw-pb-16 tw-cursor-zoom-in'>" +
				"<dd>" +
				"<div style='display:block;overflow:hidden;position:relative;z-index:0' class='tw-rounded-2'>" +
				"<div style='display:block;box-sizing:border-box;padding-top:68.08510638297872%'></div>" +
				"<noscript>" +
				"<img src='http://120.48.47.144:8899/images/" + item
				.highlights_configuration_images_url + "' alt='" + item.highlights_configuration_name +
				"' width='94' height='64' style='position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover'class='view-image_zoom__3b9VV''/>" +
				"</noscript>" +
				"<img src='http://120.48.47.144:8899/images/" + item
				.highlights_configuration_images_url + "' alt='" + item.highlights_configuration_name +
				"' width='94' height='64' style='position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover'class='zoom''>" +
				"</div>" +
				"</dd>" +
				"<dt class='line-1 tw-left-22 tw-mt-4'>" + item.highlights_configuration_name +
				"</dt>" +
				"</dl>" +
				"</li>";
		})
		$("#tw-flex-wraps li").remove();
		$("#tw-flex-wraps").append(str);
	}, "JSON");
}

/**
 * 亮点配置的图片数量
 */
function getConfigImgCount() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/getConfigImgCount/" + car_model_id, function(data) {
		var str = "<p class='tw-ml-12'>共<em class='tw-text-color-red-500 tw-mx-4 tw-not-italic'>" + data.couts +
			"项</em>亮点配置</p>";
		$("#Car_config_count p").remove();
		$("#Car_config_count").append(str);
	}, "JSON");
}

/**
 * 实拍大图点击事件
 */
function BigImgClick() {
	location.href = "http://127.0.0.1:8899/html/car_actual_large_picture.html?" + car_brand_substr_id + "/" +
		car_series_id + "/" + car_model_id + "/1/0/" + indexS;
}

/**
 * 根据车名和车型名称，查看详细配置
 */
function getByIdAndNameConfiguration() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/select_car_model_ById/" + car_model_id, function(
		data) {
		var str = "<span class='xiangqings'>" +
			"<p class='tw-text-color-gray-800 tw-mt-6 tw-leading-18 xl:tw-mt-12 xl:tw-leading-22'><span>" + data
			.car_series.brand.brand_name + " / " + data.car_series.car_series_name + " / " + data.car_series
			.car_level.car_level_name + "</span><span class='tw-ml-12'>指导价：" + data
			.car_model_manufacturer_price + "万</span></p>" +
			"<div class='tw-text-color-gray-800 tw-mt-6 xl:tw-mt-12 tw-leading-28 tw-flex tw-items-center'>" +
			"<p>经销商报价：<span class='tw-font-semibold tw-text-color-red-500 tw-text-18 tw-align-bottom'>" + data
			.car_model_distributer_price + "万</span></p>" +
			"<p class='tw-ml-12'>最高降幅：<span class='tw-font-semibold tw-text-common-green tw-text-18 tw-align-bottom'><i class='DCD_Icon icon_reduce tw-font-normal tw-align-bottom tw-text-18'></i>" +
			data.car_model_max_decline + "万</span></p>" +
			"<p class='tw-ml-12'>车主参考价：<span class='tw-font-semibold tw-text-common-black tw-text-18 tw-align-bottom'>" +
			data.car_model_owner_reference_price + "万</span></p>" +
			"</div>" +
			"<div class='head-info_btn-wrap__2kOvp'>" +
			"<a target='_blank' rel='opener nofollow' onclick=\"BigImgClick()\">" +
			"<button type='button' class='tw-h-40 tw-rounded-2 tw-bg-common-yellow hover:tw-bg-common-highlight-yellow'>实拍大图</button></a>" +
			"<a target='_blank' rel='opener nofollow' href='http://127.0.0.1:8899/html/car_purchase_calculation.html?"+car_series_id+"/" +
			car_model_id + "'>" +
			"<button type='button' class='head-info_loan-button__2l_8I'><span class='tw-leading-20'>购车计算</span></button></a>" +
			"</div>" +
			"<div class='tw-flex tw-overflow-hidden tw-text-12 xl:tw-text-14 tw-mt-12'>" +
			"<div class='head-info_config-wrap__2VNrI'>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>发动机</span><span title='" +
			data.car_model_engine + "'>" + data.car_model_engine + "</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>功率</span><span title='" +
			data.car_model_power + "kW'>" + data.car_model_power + "kW</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>扭矩</span><span title='" +
			data.car_model_torque + "N·m'>" + data.car_model_torque + "N·m</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>百公里加速</span><span title='" +
			data.car_model_km_accelerate + "s'>" + data.car_model_km_accelerate + "s</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>能源类型</span><span title='" +
			data.energy.energy_name + "'>" + data.energy.energy_name + "</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>变速箱</span><span title='" +
			data.car_model_variable_box + "'>" + data.car_model_variable_box + "</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>百公里油耗</span><span title='" +
			data.car_model_oil_consumption + "L/100km'>" + data.car_model_oil_consumption +
			"L/100km</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>驱动方式</span><span title='" +
			data.car_model_driving_mode + "'>" + data.car_model_driving_mode + "</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>四驱类型</span><span title='" +
			data.car_model_drive_type + "'>" + data.car_model_drive_type + "</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>前悬架形式</span><span title='" +
			data.car_model_front_suspension_type + "'>" + data.car_model_front_suspension_type +
			"</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>后悬架形式</span><span title='" +
			data.car_model_rear_suspension_type + "'>" + data.car_model_rear_suspension_type + "</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>空调控制方式</span><span title='" +
			data.car_model_air_conditioning_direction + "'>" + data.car_model_air_conditioning_direction +
			"</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>座椅材质</span><span title='" +
			data.car_model_seat_material + "'>" + data.car_model_seat_material + "</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>轴距</span><span title='" +
			data.car_series.car_series_wheelbase + "mm'>" + data.car_series.car_series_wheelbase +
			"mm</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>整备质量</span><span title='" +
			data.car_model_quality + "Kg'>" + data.car_model_quality + "Kg</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>油箱容积</span><span title='" +
			data.car_model_tank_volume + "L'>" + data.car_model_tank_volume + "L</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>最高时速</span><span title='" +
			data.car_model_max_speed + "Km/h'>" + data.car_model_max_speed + "Km/h</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>座椅数</span><span title='" +
			data.car_model_seat_count + "个'>" + data.car_model_seat_count + "个</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>行李箱容积</span><span title='" +
			data.car_model_cargo_volume + "'>" + data.car_model_cargo_volume + "</span></div>" +
			"<div class='head-info_item__34EcE'><span class='tw-text-color-gray-700 tw-mr-6'>车体结构</span><span title='" +
			data.car_model_body_structure + "'>" + data.car_model_body_structure + "</span></div>" +
			"</div>" +
			"</div>" +
			"</span>";
		$(".xiangqings").remove();
		$(".XiangQing").append(str);
	}, "JSON");
}

/**
 * 热门咨询
 */
function getInformation() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/select_information/" + car_model_id, function(data) {
		var str = "";
		var information_date = "";
		$(data).each(function(index, item) {
			var date = new Date();
			var newDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
			//时间差=（当前时间-数据库查找时间）数/除以(毫秒*秒*分钟*小时)  java初始为毫秒所以除以1000
			var this_date = parseInt((new Date(newDate) - new Date(item.information_release_date)) / (
				1000 * 60 * 60 * 24));
			if (this_date <= 7) {
				information_date = this_date + "天前";
			} else {
				information_date = item.information_release_date;
			}
			str += "<div class='common-card_wrapper__Inr_n tw-pb-40'>" +
				"<div>" +
				"<div class='tw-relative tw-text-common-black' style='font-size: 0px;'>" +
				"<a title='" + item.information_title +
				"' href='http://127.0.0.1:8899/html/car_information_details.html?" + item.information_id +
				"/" + car_series_id +
				"' target='_blank' class='jsx-1095092229 g-active-link-text' rel='opener'>" +
				"<div class='tw-rounded-4 g-load-img-wrap' style='display: block; overflow: hidden; position: relative; z-index: 0;'>" +
				"<div style='display: block; box-sizing: border-box; padding-top: 56%;'></div>" +
				"<img src='http://120.48.47.144:8899/images/" + item.information_images
				.information_images_1 + "' alt='" + item.information_title +
				"' width='250' height='140' class='zoom' style='position: absolute; inset: 0px; box-sizing: border-box; padding: 0px; border: none; margin: auto; display: block; width: 0px; height: 0px; min-width: 100%; max-width: 100%; min-height: 100%; max-height: 100%; object-fit: cover;'>" +
				"</div>" +
				"</a>" +
				"<div class='jsx-1904556275 author-avatar_avatar-wrap__1pWQN'>" +
				"<div class='jsx-2217341492 avatar_avatar-img__170Bh tw-text-0'>" +
				"<a href='http://127.0.0.1:8899/html/car_my_homepage.html?"+item.user.user_id+"' title='" + item.user.user_name +
				"个人主页 ' target='_blank' rel='opener'>" +
				"<div class='avatar tw-rounded-full' style='display: inline-block; max-width: 100%; overflow: hidden; position: relative; z-index: 0;'>" +
				"<div style='box-sizing: border-box; display: block; max-width: 100%;'>" +
				"<img alt='' src='data:image/svg+xml;utf-8,<svg width=&quot;40&quot; height=&quot;40&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot;/>' aria-hidden='true' role='presentation' style='max-width: 100%; display: block; margin: 0px; border: none; padding: 0px;'>" +
				"</div>" +
				"<img src='http://120.48.47.144:8899/images/" + item.user.user_head_portrait_url +
				"' alt='" + item.user.user_name +
				"头像' width='40' height='40' class='' style='position: absolute; inset: 0px; box-sizing: border-box; padding: 0px; border: none; margin: auto; display: block; width: 0px; height: 0px; min-width: 100%; max-width: 100%; min-height: 100%; max-height: 100%; object-fit: cover;'>" +
				"</div>" +
				"</a></div>" +
				"<p title='" + item.user.user_name +
				"' class='jsx-1904556275 author-avatar_name__3ex3- name line-1'><a href='http://127.0.0.1:8899/html/car_my_homepage.html?"+item.user.user_id+"' title='" +
				item.user.user_name + "个人主页 ' target='_blank' rel='opener'>" + item.user.user_name +
				"</a></p>" +
				"</div>" +
				"</div>" +
				"<h3 class='tw-leading-22 tw-text-16 tw-font-medium tw-text-common-black tw-text-justify line-2 g-active-link-text tw-mt-36'>" +
				"<a title='" + item.information_title +
				"' href='http://127.0.0.1:8899/html/car_information_details.html?" + item.information_id +
				"/" + car_series_id +
				"' target='_blank' class='jsx-1095092229 g-active-link-text' rel='opener'>" +
				item.information_title + "" +
				"</a></h3>" +
				"<p class='tw-mt-8 tw-h-20 tw-lead tw-text-common-gray tw-text-14'><a title='" + item
				.information_title +
				"' href='http://127.0.0.1:8899/html/car_information_details.html?" + item.information_id +
				"/" + car_series_id +
				"' target='_blank' class='jsx-1095092229 g-active-link-text' rel='opener'><span class='tw-mr-8'>" +
				item.information_read_count + "次阅读</span><span>" + information_date +
				"</span></a></p>" +
				"</div>" +
				"</div>";
		});
		$("#Hot_Car_Information div").remove();
		$("#Hot_Car_Information").append(str);
	}, "JSON");
}

/**
 * 相关车系
 */
function getByCar_series() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/select_Car_series/" + car_brand_substr_id, function(
		data) {
		var str = "";
		$(data).each(function(index, item) {
			str += "<li class='tw-flex-none tw-w-100/3 md:tw-w-full' style='padding:3px'>" +
				"<div class='related-series_wrap__XPsZn'>" +
				"<div class='tw-flex tw-items-center tw-relative tw-pb-40 xl:tw-pb-0'>" +
				"<div class='tw-flex tw-items-center tw-justify-center tw-w-100 tw-h-80 tw-pr-10 xl:tw-w-140 xl:tw-h-100' data-log-click='{&quot;event&quot;:&quot;clk_event&quot;,&quot;params&quot;:{&quot;page_id&quot;:&quot;page_car_style_home&quot;,&quot;event_id&quot;:&quot;recommended_car_series&quot;,&quot;car_series_id&quot;:289,&quot;car_series_name&quot;:&quot;" +
				item.brand.brand_name + "&quot;,&quot;related_car_series_id&quot;:&quot;535&quot;}}'>" +
				"<a href='http://127.0.0.1:8899/html/car_series_index.html?" + item.car_series_id +
				"' target='_blank'>" +
				"<div style='display:inline-block;max-width:100%;overflow:hidden;position:relative;z-index:0'>" +
				"<div style='box-sizing:border-box;display:block;max-width:100%'>" +
				"<img style='max-width:100%;display:block;margin:0;border:none;padding:0' alt='' src='data:image/svg+xml;utf-8,&lt;svg width=&quot;120&quot; height=&quot;80&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot;/&gt;' aria-hidden='true' role='presentation' /></div>" +
				"<noscript>" +
				"<img src='http://120.48.47.144:8899/images/" + item.car_series_images_url_1 +
				"' alt='询底价' width='120' height='80' style='position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover' class='view-image_zoom__3b9VV' /></noscript>" +
				"<img src='http://120.48.47.144:8899/images/" + item.car_series_images_url_1 +
				"' alt='询底价' width='120' height='80' style='position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover' class='zoom'/>" +
				"</div>" +
				"</a></div>" +
				"<div class='jsx-2426259947 tw-flex-1 tw-w-0'>" +
				"<div data-log-click='{&quot;event&quot;:&quot;clk_event&quot;,&quot;params&quot;:{&quot;page_id&quot;:&quot;page_car_style_home&quot;,&quot;event_id&quot;:&quot;recommended_car_series&quot;,&quot;car_series_id&quot;:289,&quot;car_series_name&quot;:&quot;" +
				item.brand.brand_name +
				"&quot;,&quot;related_car_series_id&quot;:&quot;535&quot;}}' class='jsx-2426259947 tw-text-16 tw-leading-24 tw-font-semibold tw-truncate'>" +
				"<a href='http://127.0.0.1:8899/html/car_series_index.html?" + item.car_series_id +
				"' target='_blank'>" + item.car_series_name + "</a></div>" +
				"<div class='jsx-2426259947 tw-text-14 tw-leading-22 xl:tw-text-16 xl:tw-leading-24 tw-font-semibold tw-text-common-red tw-truncate'>" +
				"<span data-log-click='{&quot;event&quot;:&quot;clk_event&quot;,&quot;params&quot;:{&quot;page_id&quot;:&quot;page_car_style_home&quot;,&quot;event_id&quot;:&quot;recommended_car_series&quot;,&quot;car_series_id&quot;:289,&quot;car_series_name&quot;:&quot;" +
				item.brand.brand_name +
				"&quot;,&quot;related_car_series_id&quot;:&quot;535&quot;}}' class='jsx-2426259947'><a href='http://127.0.0.1:8899/html/car_series_index.html?" +
				item.car_series_id + "' target='_blank'>" +
				item.min_manufacturer_price + '~' + item.max_manufacturer_price + "万</a></span></div>" +
				"<div class='jsx-2426259947 tw-flex tw-mt-8 tw-left-0 tw-right-0 tw-bottom-0 tw-absolute xl:tw-flex xl:tw-relative xl:tw-bottom-0'>" +
				"<button type='button' data-log-click='{&quot;event&quot;:&quot;clk_event&quot;,&quot;params&quot;:{&quot;page_id&quot;:&quot;page_car_style_home&quot;,&quot;event_id&quot;:&quot;recommended_car_series_btn&quot;,&quot;car_series_id&quot;:289,&quot;car_series_name&quot;:&quot;" +
				item.brand.brand_name +
				"&quot;,&quot;obj_text&quot;:&quot;图片&quot;,&quot;related_car_series_id&quot;:&quot;535&quot;}}' class='jsx-2426259947 tw-h-28 tw-leading-26 tw-rounded-2 tw-border-1 tw-border-solid tw-border-video-gray tw-text-12 tw-flex-auto tw-mr-3 lg:tw-mr-6 tw-cursor-default hover:tw-bg-common-yellow hover:tw-bg-opacity-40 hover:tw-border-common-yellow hover:tw-border-opacity-100'>" +
				"<a target='_blank' href=\"http://127.0.0.1:8899/html/car_actual_large_picture.html?" +
				car_brand_substr_id + "/" + item.car_series_id + "/0/" + indexS +
				"/0 \">图片</a></button>" +
				"<button type='button' data-log-click='{&quot;event&quot;:&quot;clk_event&quot;,&quot;params&quot;:{&quot;page_id&quot;:&quot;page_car_style_home&quot;,&quot;event_id&quot;:&quot;recommended_car_series_btn&quot;,&quot;car_series_id&quot;:289,&quot;car_series_name&quot;:&quot;" +
				item.brand.brand_name +
				"&quot;,&quot;obj_text&quot;:&quot;询底价&quot;,&quot;related_car_series_id&quot;:&quot;535&quot;}}'class='jsx-2426259947 tw-h-28 tw-leading-26 tw-rounded-2 tw-border-1 tw-border-solid tw-text-12 tw-flex-auto tw-cursor-default tw-bg-common-yellow tw-border-common-yellow hover:tw-bg-common-highlight-yellow hover:tw-border-common-highlight-yellow tw-font-medium'>" +
				"<a target='_blank' rel='opener nofollow' href='http://127.0.0.1:8899/html/car_purchase_calculation.html?" +
				item.car_series_id + "/0'>购车计算</a></button>" +
				"</div>" +
				"</div>" +
				"</div>" +
				"</div>" +
				"</li>";
		})
		$("#Car_series_li li").remove();
		$("#Car_series_li").append(str);
	}, "JSON");
}


/**
 * 大图
 */
function getCar_model_BigImages() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/selectCar_model_images/1/" + car_brand_substr_id,
		function(data) {
			var str = "<a target='_blank' href='/series-289/images/wg-56712-x-x' rel='opener'>" +
				"<div style='display:block;overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0;z-index:0'class='tw-rounded-2 tw-filter tw-blur-20'>" +
				"<img src='//p3.dcarimg.com/img/motor-mis-img/3d070cbe9d3cc1e98fd7847fc3ea4c6f~700x0.webp' width='350' height='230' style='position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover'class='zoom'></div>" +
				"<div style='display:block;overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0;z-index:0' class='tw-rounded-2 tw-bg-common-black tw-bg-opacity-80'>" +
				"<img src='http://120.48.47.144:8899/images/" + data.car_model_images_url +
				"' width='350' height='230' style='position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:contain'class='zoom'></div>" +
				"</a>";
			$("#Car_model_Bigimage a").remove();
			$("#Car_model_Bigimage").append(str);
		}, "JSON")
}

/**
 * 车型的外观图
 */
function getCar_model_WaiGuan() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/selectCar_model_images/1/" + car_brand_substr_id,
		function(data) {
			var str = "<a class='tw-block' onclick=\"getCar_model_WaiGuanClick()\" target='_blank' rel='opener'>" +
				"<div style='display:block;overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0;z-index:0' class='tw-rounded-2'>" +
				"<img src='http://120.48.47.144:8899/images/" + data.car_model_images_url +
				"' width='86' height='56'style='position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover' class='zoom'></div>" +
				"<p class='head-info_img-text__ae8wl'>外观" + data.cout + "张</p>" +
				"</a>";
			$("#car_model_first a").remove();
			$("#car_model_first").append(str);
		}, "JSON")
}

/**
 * 查看对应车型的更多图片的点击事件
 */
function getCar_model_WaiGuanClick() {
	location.href = "http://127.0.0.1:8899/html/car_actual_large_picture.html?" + car_brand_substr_id + "/" +
		car_series_id + "/" + car_model_id + "/1/0/" + indexS;
}

function getCar_model_neishiClick() {
	location.href = "http://127.0.0.1:8899/html/car_actual_large_picture.html?" + car_brand_substr_id + "/" +
		car_series_id + "/" + car_model_id + "/2/0/" + indexS;
}

function getCar_model_kojianClick() {
	location.href = "http://127.0.0.1:8899/html/car_actual_large_picture.html?" + car_brand_substr_id + "/" +
		car_series_id + "/" + car_model_id + "/3/0/" + indexS;
}

function getCar_model_MoreClick() {
	location.href = "http://127.0.0.1:8899/html/car_actual_large_picture.html?" + car_brand_substr_id + "/" +
		car_series_id + "/" + car_model_id + "/4/0/" + indexS;
}

/**
 * 车型内饰图
 */
function getCar_model_neishi() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/selectCar_model_images/2/" + car_brand_substr_id,
		function(data) {
			var str = "<a class='tw-block' onclick=\"getCar_model_neishiClick()\" target='_blank' rel='opener'>" +
				"<div style='display:block;overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0;z-index:0' class='tw-rounded-2'>" +
				"<img src='http://120.48.47.144:8899/images/" + data.car_model_images_url +
				"' width='86' height='56' style='position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover' class='zoom'></div>" +
				"<p class='head-info_img-text__ae8wl'>内饰" + data.cout + "张</p>" +
				"</a>";
			$("#car_model_second a").remove();
			$("#car_model_second").append(str);
		}, "JSON");
}

/**
 * 车型空间图
 */
function getCar_model_kojian() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/selectCar_model_images/3/" + car_brand_substr_id,
		function(data) {
			var str = "<a class='tw-block' onclick=\"getCar_model_kojianClick()\" target='_blank' rel='opener'>" +
				"<div style='display:block;overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0;z-index:0' class='tw-rounded-2'>" +
				"<img src='http://120.48.47.144:8899/images/" + data.car_model_images_url +
				"' width='86' height='56' style='position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover' class='zoom'></div>" +
				"<p class='head-info_img-text__ae8wl'>空间" + data.cout + "张</p>" +
				"</a>";
			$("#car_model_third a").remove();
			$("#car_model_third").append(str);
		}, "JSON");
}

/**
 * 更多图片
 */
function getCar_model_More() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_ModelController/selectCar_model_images/3/" + car_brand_substr_id,
		function(data) {
			var str = "<a class='tw-block' onclick=\"getCar_model_MoreClick()\" target='_blank' rel='opener'>" +
				"<div style='display:block;overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0;z-index:0' class='tw-rounded-2'>" +
				"<img src='http://120.48.47.144:8899/images/" + data.car_model_images_url +
				"' width='86' height='56' style='position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover' class='zoom'></div>" +
				"<p class='head-info_img-text__ae8wl'>更多<iclass='DCD_Icon icon_into_12 tw-text-12 lg:tw-text-14 tw-align-bottom'></i></p>" +
				"</a>";
			$("#car_model_fourth a").remove();
			$("#car_model_fourth").append(str);
		}, "JSON");
}
